package dancespeedyenumsmyredis

type MiniGameTurntableDrawEnums struct {
}

var MiniGameTurntableDrawEnumsObject MiniGameTurntableDrawEnums

const (
	// 小游戏转盘抽奖每日任务
	TurntableDrawDayTaskSignInRedis    = "mini_game_turntable_draw_day_task_sign_in"    //每日签到
	TurntableDrawDayTaskRoomLeaveRedis = "mini_game_turntable_draw_day_task_room_leave" //每日直播间下场
	TurntableDrawDayTaskShareRedis     = "mini_game_turntable_draw_day_task_share"      //每日分享

	// 后台配置 每日任务Id 枚举
	TurntableDrawDayTaskSignInType    = 1 //每日签到
	TurntableDrawDayTaskRoomLeaveType = 2 //每日直播间下场
	TurntableDrawDayTaskShareType     = 3 //每日分享

	// 转盘抽奖次数来源 枚举
	TurntableDrawNumChangeLogSourceDayTaskSignIn = 1 //每日签到
	TurntableDrawNumChangeLogSourceRoomLeave     = 2 //每日直播间下场
	TurntableDrawNumChangeLogSourceShare         = 3 //每日分享
	TurntableDrawNumChangeLogSourceDrawPrize     = 4 //转盘抽奖

	// 转盘抽奖次数加减 枚举
	TurntableDrawNumChangeLogTypeAdd     = 1 //增加
	TurntableDrawNumChangeLogTypeReduced = 2 //减少

	// 转盘抽奖活动上下架
	TurntableDrawActivityIsNotUp = 0 // 未上架
	TurntableDrawActivityIsUp    = 1 // 上架中
	TurntableDrawActivityIsEnd   = 2 // 未上架

	//转盘抽奖次数获取类型
	TurntableDrawNumGetTypeTask = 0 // 每日任务
	TurntableDrawNumDrawPrize   = 1 // 转盘抽奖

	// 转盘抽奖奖品等级
	TurntableDrawPrizeLevelOne   = 1 //一等奖
	TurntableDrawPrizeLevelTwo   = 2 //二等奖
	TurntableDrawPrizeLevelThree = 3 //三等奖
	TurntableDrawPrizeLevelFour  = 4 //四等奖
	TurntableDrawPrizeLevelFive  = 5 //五等奖
	TurntableDrawPrizeLevelSix   = 6 //六等奖
	TurntableDrawPrizeLevelSeven = 7 //七等奖
	TurntableDrawPrizeLevelEight = 8 //八等奖

	// 转盘抽奖每日任务完成状态
	TurntableDrawDayTaskStatusNoFinish = 0 //未完成
	TurntableDrawDayTaskStatusFinished = 1 //已完成,待领取
	TurntableDrawDayTaskStatusReceived = 2 //已领取

)

func (e MiniGameTurntableDrawEnums) TurntableDrawTaskType() []int {
	return []int{
		TurntableDrawDayTaskSignInType,
		TurntableDrawDayTaskRoomLeaveType,
		TurntableDrawDayTaskShareType,
	}
}

func (e MiniGameTurntableDrawEnums) TurntableDrawNumSource() []int {
	return []int{
		TurntableDrawNumChangeLogSourceDayTaskSignIn,
		TurntableDrawNumChangeLogSourceRoomLeave,
		TurntableDrawNumChangeLogSourceShare,
		TurntableDrawNumChangeLogSourceDrawPrize,
	}
}

func (e MiniGameTurntableDrawEnums) TurntableDrawPrizeLevel() []int {
	return []int{
		TurntableDrawPrizeLevelOne,
		TurntableDrawPrizeLevelTwo,
		TurntableDrawPrizeLevelThree,
		TurntableDrawPrizeLevelFour,
		TurntableDrawPrizeLevelFive,
		TurntableDrawPrizeLevelSix,
		TurntableDrawPrizeLevelSeven,
		TurntableDrawPrizeLevelEight,
	}
}

func (e MiniGameTurntableDrawEnums) TurntableDrawTaskMap() map[int]int {
	m := make(map[int]int)
	for _, s := range e.TurntableDrawTaskType() {
		m[s] = s
	}
	return m
}

func (e MiniGameTurntableDrawEnums) TurntableDrawTaskNameMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.TurntableDrawTaskType() {
		m[s] = e.TurntableDrawTaskTypeString(s)
	}
	return m
}

func (e MiniGameTurntableDrawEnums) TurntableDrawNumSourceNameMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.TurntableDrawNumSource() {
		m[s] = e.TurntableDrawNumSourceString(s)
	}
	return m
}

func (e MiniGameTurntableDrawEnums) TurntableDrawPrizeLevelNameMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.TurntableDrawPrizeLevel() {
		m[s] = e.TurntableDrawPrizeLevelString(s)
	}
	return m
}

// 返回每个任务对应的redis key
func (e MiniGameTurntableDrawEnums) TurntableDrawTaskRedisKeyString(tag int) string {
	switch tag {
	case TurntableDrawDayTaskSignInType:
		return TurntableDrawDayTaskSignInRedis
	case TurntableDrawDayTaskRoomLeaveType:
		return TurntableDrawDayTaskRoomLeaveRedis
	case TurntableDrawDayTaskShareType:
		return TurntableDrawDayTaskShareRedis
	default:
		return ""
	}
}

func (e MiniGameTurntableDrawEnums) TurntableDrawTaskTypeString(tag int) string {
	switch tag {
	case TurntableDrawDayTaskSignInType:
		return "每日签到"
	case TurntableDrawDayTaskRoomLeaveType:
		return "每日直播间下场"
	case TurntableDrawDayTaskShareType:
		return "每日分享"
	default:
		return "未知"
	}
}

func (e MiniGameTurntableDrawEnums) TurntableDrawNumSourceString(tag int) string {
	switch tag {
	case TurntableDrawNumChangeLogSourceDayTaskSignIn:
		return "每日签到"
	case TurntableDrawNumChangeLogSourceRoomLeave:
		return "每日直播间下场"
	case TurntableDrawNumChangeLogSourceShare:
		return "每日分享"
	case TurntableDrawNumChangeLogSourceDrawPrize:
		return "转盘抽奖"
	default:
		return "未知"
	}
}

func (e MiniGameTurntableDrawEnums) TurntableDrawPrizeLevelString(tag int) string {
	switch tag {
	case TurntableDrawPrizeLevelOne:
		return "一等奖"
	case TurntableDrawPrizeLevelTwo:
		return "二等奖"
	case TurntableDrawPrizeLevelThree:
		return "三等奖"
	case TurntableDrawPrizeLevelFour:
		return "四等奖"
	case TurntableDrawPrizeLevelFive:
		return "五等奖"
	case TurntableDrawPrizeLevelSix:
		return "六等奖"
	case TurntableDrawPrizeLevelSeven:
		return "七等奖"
	case TurntableDrawPrizeLevelEight:
		return "八等奖"
	default:
		return "未知"
	}
}
